package Test02;

public class BankTest {
	
	public static void main(String[] args) {
		Bank bank1 = new Business1();
		Bank bank2 = new Business2();
		
		bank1.process();
		bank2.process();
	
	}
	
	
}

abstract class Bank{
	/**
	 * 银行业务流程：固定的步骤：取号 、业务评价 用final修饰
	 * 				可变的步骤：业务不同。
	 */
	public void list(){
		System.out.println("排队取号");
	}
	
	public abstract void business();
	
	public void evaluate(){
		System.out.println("业务评价");
	}
	
	//将流程固定
	public final void process(){
		list();
		business();
		evaluate();
	}
	
}

class Business1 extends Bank{

	@Override
	public void business() {
		
		System.out.println("秦浩然 要存款 两个忆");
	}
	
}

class Business2 extends Bank{

	@Override
	public void business() {
		
		System.out.println("秦浩然 要取款");
	}
	
}
